﻿<?xml version="1.0" encoding="utf-8" ?>
<ResourceDictionary 
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >

    <Style x:Key="btnPin" TargetType="ToggleButton">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToggleButton">
                    <Grid Height="25" Width="25">

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Unfocused"/>
                                <VisualState x:Name="Focused"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CheckedStates">
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="cvsPinned" Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.5" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="cvsUnPinned" Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.5" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unchecked">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="cvsPinned" Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.5" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="cvsUnPinned" Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.5" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="MouseOver"/>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Pressed"/>
                                <VisualState x:Name="Disabled"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Canvas x:Name="cvsPinned">
                            <Path Data="M10,0 C12.761423,0 15.261423,0.83946609 17.071068,2.1966991 L17.234011,2.3218555 L17.280832,2.3033943 C17.816896,2.107115 18.395939,1.9999957 19,1.9999956 C21.761423,1.9999957 24,4.2385721 24,6.9999957 C24,9.7614193 21.761423,11.999996 19,11.999996 C18.741117,11.999996 18.486828,11.980321 18.23855,11.942385 L18.083948,11.914776 L18.013353,11.98737 C16.189734,13.816221 13.27919,15 10,15 C4.4771523,15 0,11.642136 0,7.5 C0,3.3578644 4.4771523,0 10,0 z" Stretch="Fill" Stroke="{x:Null}" StrokeThickness="1" UseLayoutRounding="False" Width="25.079" Height="16.644" Canvas.Left="0.805" Canvas.Top="2.255" RenderTransformOrigin="0.5,0.5">
                                <Path.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform Angle="-37.44"/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Path.RenderTransform>
                                <Path.Fill>
                                    <RadialGradientBrush GradientOrigin="0.302,0.571">
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.1490000486373901" ScaleY="1.1490000486373901"/>
                                                <TranslateTransform X="-0.128" Y="0.034"/>
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#7F000000" Offset="0.45"/>
                                        <GradientStop Color="#19000000" Offset="1"/>
                                        <GradientStop Color="Black"/>
                                    </RadialGradientBrush>
                                </Path.Fill>
                            </Path>
                            <Ellipse Height="15" Width="15" Canvas.Top="6" StrokeThickness="0.5" Canvas.Left="2">
                                <Ellipse.Fill>
                                    <RadialGradientBrush GradientOrigin="0.41,0.953" Center="0.581,0.707" RadiusY="0.373" RadiusX="0.373">
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.1490000486373901" ScaleY="1.1490000486373901"/>
                                                <SkewTransform CenterX="0.5" CenterY="0.5"/>
                                                <RotateTransform CenterX="0.5" CenterY="0.5"/>
                                                <TranslateTransform X="-0.14000000059604645" Y="-0.18799999356269836"/>
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#FFFF0000" Offset="0.106"/>
                                        <GradientStop Color="#FFA70000" Offset="1"/>
                                    </RadialGradientBrush>
                                </Ellipse.Fill>
                            </Ellipse>
                            <Path Canvas.Left="5.188" Canvas.Top="9.75" Stretch="Fill" UseLayoutRounding="False" Data="M1.9998813,1.9998686 L1.993325,2.0084202 C1.3281428,2.921757 1.000002,3.8781717 1.000002,5 C1.000002,7.7614236 3.2385783,10 6.0000019,10 C7.1218305,10 8.1573687,9.6305475 8.9915819,9.0066767 L9.0001202,9.0001307 L8.9335699,9.0869341 C8.0181456,10.251802 6.5964479,10.999999 5,10.999999 C2.2385762,10.999999 0,8.7614222 0,5.999999 C0,4.4035511 0.74819601,2.9818532 1.9130648,2.0664296 z" Height="8.068" Width="8.187">
                                <Path.Fill>
                                    <LinearGradientBrush EndPoint="0.967,0.72" StartPoint="0.25,0.063">
                                        <GradientStop Color="#BFFFFFFF" Offset="0.506"/>
                                        <GradientStop Color="#3FFFFFFF" Offset="1"/>
                                        <GradientStop Color="#3FFFFFFF"/>
                                    </LinearGradientBrush>
                                </Path.Fill>
                            </Path>
                            <Ellipse StrokeThickness="0" Height="9" Width="9" Canvas.Left="6" Canvas.Top="8">
                                <Ellipse.Fill>
                                    <LinearGradientBrush EndPoint="0.768,1.009" StartPoint="-0.009,-0.002">
                                        <GradientStop Color="#FF8B0000" Offset="1"/>
                                        <GradientStop Color="#FFFF0000" Offset="0.381"/>
                                        <GradientStop Color="#FF4C0000" Offset="0"/>
                                    </LinearGradientBrush>
                                </Ellipse.Fill>
                                <Ellipse.Stroke>
                                    <LinearGradientBrush EndPoint="0.783,0.856" StartPoint="0.184,0.184">
                                        <GradientStop Color="#FFFFFFFF"/>
                                        <GradientStop Color="#FFFF0000" Offset="0.531"/>
                                        <GradientStop Color="#FF690000" Offset="1"/>
                                    </LinearGradientBrush>
                                </Ellipse.Stroke>
                            </Ellipse>
                            <Ellipse StrokeThickness="1" Height="12" Width="12" Canvas.Left="7" Canvas.Top="4">
                                <Ellipse.Stroke>
                                    <LinearGradientBrush EndPoint="0.132,0.78" StartPoint="0.861,0.154">
                                        <GradientStop Color="#FDFF0000"/>
                                        <GradientStop Color="#FFFFB2B2" Offset="1"/>
                                    </LinearGradientBrush>
                                </Ellipse.Stroke>
                                <Ellipse.Fill>
                                    <LinearGradientBrush EndPoint="0.806,0.079" MappingMode="RelativeToBoundingBox" StartPoint="0.225,0.834">
                                        <GradientStop Color="#FFFF7070" Offset="0.294"/>
                                        <GradientStop Color="Red" Offset="1"/>
                                    </LinearGradientBrush>
                                </Ellipse.Fill>
                            </Ellipse>
                            <Ellipse StrokeThickness="1" Height="12" Width="12" Canvas.Left="7" Canvas.Top="4">
                                <Ellipse.Stroke>
                                    <LinearGradientBrush EndPoint="0.131999999284744,0.779999971389771" StartPoint="0.861000001430511,0.153999999165535">
                                        <LinearGradientBrush.RelativeTransform>
                                            <MatrixTransform/>
                                        </LinearGradientBrush.RelativeTransform>
                                        <GradientStop Color="Transparent" Offset="1"/>
                                        <GradientStop Color="Transparent"/>
                                    </LinearGradientBrush>
                                </Ellipse.Stroke>
                                <Ellipse.Fill>
                                    <LinearGradientBrush EndPoint="0.806,0.079" MappingMode="RelativeToBoundingBox" StartPoint="0.225,0.834">
                                        <GradientStop Color="#FFFF7070"/>
                                        <GradientStop Color="Red" Offset="0.477"/>
                                    </LinearGradientBrush>
                                </Ellipse.Fill>
                            </Ellipse>
                            <Path Data="M5.5625,8.1875 L16.1255,10.7495" Height="3.438" Canvas.Left="7.749" Stretch="Fill" StrokeThickness="0.5" Canvas.Top="8.372" UseLayoutRounding="False" Width="10.625" Stroke="#FFE50000" StrokeStartLineCap="Round" StrokeEndLineCap="Round"/>
                            <Path Data="M5.5625,8.1875 L16.1255,10.7495" Height="3.437" Canvas.Left="7.874" Stretch="Fill" StrokeThickness="0.5" Canvas.Top="7.814" UseLayoutRounding="False" Width="10.625" Stroke="#FFFF6E6E" StrokeStartLineCap="Round" StrokeEndLineCap="Round"/>
                        </Canvas>

                        <Canvas x:Name="cvsUnPinned" Margin="0">
                            <Path Height="1" Width="10" Canvas.Left="0.415" Canvas.Top="13.897" Fill="#FFFFFFFF" Stretch="None" Data="M0,0 L9,0" UseLayoutRounding="False">
                                <Path.Stroke>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FF000000"/>
                                        <GradientStop Color="#FFFFFFFF" Offset="0.197"/>
                                        <GradientStop Color="#FF000000" Offset="1"/>
                                    </LinearGradientBrush>
                                </Path.Stroke>
                            </Path>
                            <Path Height="13.412" Width="10" Canvas.Left="7.415" Canvas.Top="7.551" Stretch="None" Stroke="{x:Null}" Data="M0.61944723,0.49295387 L0.61944723,13.469648 C0.61944723,13.469648 5.8847485,13.420717 5.8847485,6.9618769 C5.8847485,0.24143352 0.61944723,0.49295387 0.61944723,0.49295387 z" UseLayoutRounding="False">
                                <Path.Fill>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FF646464" Offset="1"/>
                                        <GradientStop Color="#FFC4C4C4" Offset="0"/>
                                    </LinearGradientBrush>
                                </Path.Fill>
                            </Path>
                            <Path Height="10" Width="11" Canvas.Left="11.415" Canvas.Top="9.478" Stretch="None" Stroke="{x:Null}" Data="M1.0703522,1.0114791 L10.746928,1.4371198 L10.746928,8.5628805 L1.2013108,8.9321709 z" UseLayoutRounding="False">
                                <Path.Fill>
                                    <LinearGradientBrush EndPoint="0.508,0.675" StartPoint="0.508,-0.033">
                                        <GradientStop Color="#FF989898" Offset="0.937"/>
                                        <GradientStop Color="#FFA6A6A6" Offset="1"/>
                                        <GradientStop Color="#FFFFFFFF" Offset="0.515"/>
                                        <GradientStop Color="#FFAEAEAE" Offset="0.27"/>
                                    </LinearGradientBrush>
                                </Path.Fill>
                            </Path>
                            <Rectangle Height="12" Stroke="{x:Null}" Width="2.664" Canvas.Left="21" Canvas.Top="8">
                                <Rectangle.Fill>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FF848484" Offset="1"/>
                                        <GradientStop Color="#FFFFFFFF" Offset="0.333"/>
                                        <GradientStop Color="#FFDFDFDF" Offset="0"/>
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                            <Path Height="14" Width="17" Canvas.Left="7.434" Canvas.Top="7.551" Stretch="None" Stroke="#FF787878" StrokeDashCap="Square" StrokeLineJoin="Round" StrokeMiterLimit="1" Data="M0.5,0.50122339 C0.5,0.50122291 1.8661008,0.43816799 3.2322073,1.2174941 C3.5737324,1.4123254 3.9152586,1.6598054 4.2354388,1.9740813 L5.0430756,3.0421474 L5.0420175,2.9767916 L13.636848,3.3965535 L13.636848,0.9930948 L16.462185,0.9930948 L16.462185,12.827355 L13.636848,12.827355 L13.636848,10.423896 L5.1684823,10.788087 L5.1653943,10.597351 L5.110599,10.740051 C4.08602,12.570828 2.3783906,13.19335 1.3538146,13.404946 C0.84152418,13.510745 0.5,13.513811 0.5,13.513811 C0.5,13.513811 0.5,4.8387527 0.5,0.50122339 z" UseLayoutRounding="False"/>
                        </Canvas>

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>